<%Const respagecode="product_search"%><% 'UTF-8%>
<%''加载通用函数和数据库连接%>
<!--#include file="../Include/Start.asp"-->
<%'检查是否登录%>
<!--#include file="../Include/checklogin.asp"-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<!--meta信息-->
	<!--#include file="../Include/meta.asp"-->
	
	
	<link href="../css/css-1.05.css" rel="stylesheet" type="text/css" />
	<link href="../css/console-1.03.css" rel="stylesheet" type="text/css" />
	<link href="../css/calendar.css" rel="stylesheet" type="text/css" />
	<link href="../css/console_home-1.06.css" rel="stylesheet" type="text/css" />
	
	<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
	<script type="text/javascript" src="../js/jquery.extend-1.06.js"></script>
	<script type="text/javascript" src="../js/common_1.01.js"></script>
	<script type="text/javascript" src="../js/console_product.js"></script>
	<script type="text/javascript" src="../js/calendar/WdatePicker.js"></script>
	<script type="text/javascript" src="../js/menu.js"></script>
	<script type="text/javascript" src="../js/TrimPathTemplate.js"></script>
</head>

<body>
<div class="wrapper">

	<!--header页头信息-->
	<!--#include file="../Include/header.asp"-->
	<!--end header页头信息-->


	<!--navigation菜单信息-->
	<!--#include file="../Include/navigation.asp"-->
	<script type="text/javascript">$("#navigation").menu('point');</script>
	<!--end navigation菜单信息-->

<!--begin container-->
<div class="container" id="container">
 
	
	<div class="c_left">
		<h2>商品管理</h2>
		<ul>
			<li class="on"><h3><a href="/console/product.asp">商品管理</a></h3></li>
			<!--li><h3><a href="/console/product.asp#div_tab_add">添加商品</a></h3></li-->
		</ul>
	</div>
	<div class="c_right">
		<div class="c_r_head">
			<ul class="head_tab">
				<li><h4><a href="product.asp##div_tab_list">商品管理</a></h4></li>
				<li class="on"><h4><a href="#">商品修改</a></h4></li>
				<li><h4><a href="product.asp##div_tab_add">添加商品</a></h4></li>
			</ul>
		</div>	<%
	 	''定义查询字段变量
 	dim id, spcode, spname, sccs, gg, shangbiao 
	
''商品信息
		id=ReplaceBadChar(Trim(request("id")))
		if(""=id) then response.redirect "/product.asp" ''如果id并没有传来跳转回原处
			''Dim rsObj,strSql
			set rsObj=Server.CreateObject("ADODB.Recordset")
			strSql = "Select  * from SP_XX where id='"&id&"' "
			''Response.Write strSql&"-----"
			rsObj.Open strSql, Conn, 1, 3
			If rsObj.BOF And rsObj.EOF Then 
				 response.redirect "/product.asp" ''如果id并没有传来跳转回原处
			end if	 
			id=ReplaceBadChar(Trim(rsObj("id")))
			spcode=ReplaceBadChar(Trim(rsObj("spcode")))
			spname=ReplaceBadChar(Trim(rsObj("spname")))
			sccs=ReplaceBadChar(Trim(rsObj("sccs")))
			gg=ReplaceBadChar(Trim(rsObj("gg")))
			shangbiao=ReplaceBadChar(Trim(rsObj("shangbiao")))

			rsObj.close
			Set rsObj = Nothing 

 '释放数据库链接
	call CloseConn	
	%>	
		
		<div class="c_r_body" id="div_tab_add">
			<form action="product_do.asp" method="post" id="form_edit">
				<input id="pid" name="pid" type="hidden" value="<%=id%>" />
			<div align="center" style="height:25px">
			请输入商品的详细信息
			</div>
				<table width="100%" border="0" cellpadding="2" cellspacing="4" style="margin:auto">
		 
					<tr>
						<td align="right">商品名称:</td>
						<td><input type="text" name="spname" id="spname" value="<%=spname%>" class="text" style="width:100px" maxlength="14" /></td>
					</tr>
					<tr>
						<td align="right">商品条形码:</td>
						<td><input type="text" name="spcode" id="spcode"  value="<%=spcode%>" class="text" style="width:100px" maxlength="14" /></td>
					</tr>
					<tr>
						<td align="right">生产厂商:</td>
						<td><input type="text" name="sccs" id="sccs"  value="<%=sccs%>" class="text" style="width:100px" maxlength="14" /></td>
					</tr>
					<tr>
						<td align="right">规格:</td>
						<td><input type="text" name="gg" id="gg"  value="<%=gg%>" class="text" style="width:100px" maxlength="14" /></td>
					</tr>
					<tr>
						<td align="right">商标:</td>
						<td><input type="text" name="shangbiao" id="shangbiao"  value="<%=shangbiao%>" class="text" style="width:90px" maxlength="14" /></td>
					</tr>
					
					<tr>
						<td align="right"> </td>
						<td><input name="" type="submit" value="添加商品" />&nbsp;<label id="result"></label></td>
					</tr>
				</table>
			</form>
		</div>
	</div>

	<script type="text/javascript">
		/*选中该tab页 需要tab页上有ID*/
		$("#product").attr("className","on")
		
		initPage_edit();	
		//$('#scform').submit();
</script>
	
 
 
</div>



	
	
</div>
<!--footer页脚信息-->
<!--#include file="../Include/footer.asp"-->
<!--end footer页脚信息-->
</div>
</body>
</html>
